<%--
    Document   : nuevoEmpleado
    Created on : 18/02/2010, 06:15:43 PM
    Author     : CASTOR61
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib prefix="r" uri="http://richfaces.ajax4jsf.org/rich" %>
<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

<script language="javascript" src="/colegiatura/js/funciones.js"></script>
<link href="/colegiatura/Estilos/estilosEsymons.css" rel="stylesheet" type="text/css" />

<f:view>
<h:form>
<table width="900" border="0" cellpadding="0" cellspacing="0">
  <tr>
      <td height="33" align="left" class="texto3">
    <h:outputLabel value="Registrar Personal" /></td>
  </tr>
  <tr><td height="20">
     <a4j:outputPanel ajaxRendered="true">
    <h:messages id="lblMessages" styleClass="messages" infoClass="infoClass" errorClass="errorClass"
                warnClass="warnClass" showDetail="true" errorStyle="color:red;"
                warnStyle="color:green;" infoStyle="color:black;" fatalStyle="color:black"/>
    </a4j:outputPanel>
      </td>
  </tr>
  <tr><td>
  <fieldset><legend>Datos Personales</legend>
  <table width="900" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100" height="25">&nbsp;</td>
    <td width="130" align="left"><h:outputLabel value="Apellido Paterno:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <h:inputText value="#{empleadoController.persona.perapellidoPaterno}" styleClass="fondo012" size="40" /></td>        
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Apellido Materno:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <h:inputText value="#{empleadoController.persona.perapellidoMaterno}" styleClass="fondo012" size="40" /></td>      
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Nombres:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <h:inputText value="#{empleadoController.persona.perNombres}" styleClass="fondo012" size="40" />
        </td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="DNI:" styleClass="texto22" /></td>
    <td colspan="2" align="left"><h:inputText value="#{empleadoController.persona.perNroDNI}" styleClass="fondo012" size="30" maxlength="8" onkeypress="validarnumero()"/>     </td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Fecha Nac.:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <r:calendar value="#{empleadoController.persona.perfechaNacimiento}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" /></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="E-mail:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
	<h:inputText value="#{empleadoController.persona.solcorreopersonal1}" styleClass="fondo012" size="60" /></td>
  </tr>  
  </table></fieldset>
  </td> </tr>
  <tr><td>
  <fieldset><legend>Datos Laborales</legend>
  <table width="900" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100" height="25">&nbsp;</td>
    <td width="130" align="left"><h:outputLabel value="Fecha Incorp.:" styleClass="texto22" /></td>
    <td width="670" colspan="2" align="left">
         <r:calendar value="#{empleadoController.empleado.eplFechainicio}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" />
        </td>       
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Fecha Termino:" styleClass="texto22" /></td>
    <td colspan="2" align="left"><r:calendar value="#{empleadoController.empleado.eplFechafin}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" />
        </td>     
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Sueldo:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <h:inputText value="#{empleadoController.empleado.eplSueldo}" styleClass="fondo012" size="30" /></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Estado:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
	<h:outputLabel value="Activo" styleClass="texto22" />
	<h:selectBooleanCheckbox value="#{empleadoController.empleado.eplEstado}" /></td>
  </tr>
  </table></fieldset>
  </td></tr>
  <tr><td><fieldset><legend>Cargos</legend>
   <table width="900" border="0" cellspacing="0">
   <tr>
    <td width="100" height="25">&nbsp;</td>
    <td width="130" align="left"><h:outputLabel value="Área:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
	<h:selectOneMenu value="#{cargoController.area}" styleClass="fondo012" onchange="submit();">
            <f:selectItem itemLabel="-------Seleccionar-------" />
            <f:selectItems value="#{areaController.selectListaAreas}" />
        </h:selectOneMenu>
        </td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Cargo:" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <h:selectOneMenu value="#{empleadoController.cargo}" styleClass="fondo012" >
            <f:selectItem itemLabel="-------Seleccionar-------" />
            <f:selectItems value="#{cargoController.selectListaCargoPorAreas}" />
        </h:selectOneMenu></td>
  </tr>
  <tr>
    <td height="25">&nbsp;</td>
    <td align="left"><h:outputLabel value="Asumio en Fecha :" styleClass="texto22" /></td>
    <td colspan="2" align="left">
        <r:calendar value="#{empleadoController.cargoEmpleado.cemFechinicio}"
         datePattern="dd/MM/yyyy" cellWidth="15" styleClass="cajaCentrada" inputClass="cajaCentrada" />
        </td>
  </tr>  
  </table></fieldset>
  </td></tr>
  <tr><td><fieldset>
  <table width="900" border="0" cellpadding="0" cellspacing="0">
  <tr><td height="30" align="center" valign="middle">
        <h:commandButton action="#{empleadoController.registraEmpleado}" value="Guardar" styleClass="enlace9" />
        <h:commandButton action="#{empleadoController.cancelar}" value="Cancelar" styleClass="enlace9" />    </td>
   </tr>
  </table></fieldset>
  </td></tr>  
</table>
</h:form>
</f:view>


